package com.example.demo.service;

import com.example.demo.entity.UserInfo;
import com.example.demo.mapper.UserInfoMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by zhangting on 14/05/2018.
 */
@Service
public class UserInfoService extends BaseBiz<UserInfoMapper,UserInfo> {

    public void save(UserInfo u){

        mapper.insert(u);
    }

    public void del(Integer id){
        mapper.deleteByPrimaryKey(id);
    }

    public void delByVo(UserInfo u){
        mapper.delete(u);
    }

    public List<UserInfo> findByName(String username){
      return   mapper.findInfoByUserName(username);
    }

    public List<UserInfo> find(){
      return  mapper.selectAll();
    }

    public List<UserInfo> findByBo(UserInfo u){
        return mapper.select(u);
    }

}
